$(document).ready(function() {
	var rpath = getRootPath() + "/";

	$('#resetCap').click(function() {
		var timestamp = (new Date()).valueOf(); 
		$.getJSON(rpath + "user/resetCaptcha/"+timestamp, function(data) {
			$('#capImg').html(data['image']);
			$("#test").val('');
		});
	});
	$('#submitCheck').click(function(event) {
		var str = trim($("#test").val());
		if (str.length <= 0) {
			$("#msg").html("请输入验证码");
			$("#msg").css("display", "block");
			$("#err").hide();
		}
	});
});